adds an 'order-cache' to retrieve models in the order of the given payload#38
adds an 'order-cache' to retrieve models in the order of the given payload#38marcogrueter wants to merge 1 commit intobeauby:masterfrom
Conversation
|
Hi @marcogrueter – thanks for the PR. As mentioned somewhere else, I do not have time to commit to maintaining this project in the foreseeable future (adding new features or reviewing PRs), but I would make an exception for this issue because it's actually fixing a bug. So I'll merge this if the scope changes from "keeping the whole store ordered" to "keeping the return value of |
|
Hi @beauby, thank you very much for your feedback and thanks for taking time to review the PR. I'm not quite sure if I got what you want mean. Currently, the only ordering of data occurs when using the "findAll" method. Changes in the destroy and initModel methods are only to keep track of the position of an entry for a specific type. The graph itself is still indexed by id and therefore in whatever order the client (browser) seems fit. Not ordering the data returned from the sync method is a dumb omission on my part (I actually never used the return of the sync methods, I'm always using find/findAll to get the data), that's certainly something that needs to be done. Thanks again for your time and sorry for needing additional feedback. |
solves Ordering of results #34
only used it in 1 project so far (integrated via npm), so further testing might be needed.
But the changes are not that complicated...
Probably won't get pulled, but maybe help someone having the same problem with ordered data.